#!/bin/sh
path=/www/wwwroot/shop.xxx.com/log/`date -d last-day +\%Y-\%m-\%d`/;
name=`date -d last-day +\%Y\%m\%d`.tar.gz;
cd $path;
tar -zcvf $name.tar.gz ./;
find $path -name "*.log" -exec rm -Rf {} \;
cd ..;
rm -rf `date -d "10 days ago" +%Y-%m-%d`;